home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / chiaro10.zip / ONEGIF.BAT < prev   
DOS Batch File  |  1993-01-29  |  1KB  |  47 lines

  1. ECHO OFF
  2. REM
  3. REM   ONEGIF.BAT version 2.0, 01/29/93
  4. REM   James W. Birdsall
  5. REM   This batch file processes the file given as the first argument through
  6. REM   GIFCHECK. It then logs the file name and a remark to the file given as
  7. REM   the second argument, depending on the errorlevel returned by GIFCHECK.
  8. REM   If GIFCHECK indicated that the file needed to be stripped, GIFSTRIP is
  9. REM   run automatically. The results from GIFSTRIP area also logged.
  10. REM
  11. GIFCHECK -B %1 > NUL:
  12. IF ERRORLEVEL 6 GOTO UNREC
  13. IF ERRORLEVEL 5 GOTO STRIPM
  14. IF ERRORLEVEL 4 GOTO STRIP
  15. IF ERRORLEVEL 3 GOTO OOPS
  16. IF ERRORLEVEL 2 GOTO UNEOF
  17. IF ERRORLEVEL 1 GOTO NOTGIF
  18. IF ERRORLEVEL 0 GOTO OK
  19. :UNREC
  20. ECHO %1 : unrecognized ERRORLEVEL! >> %2
  21. GOTO END
  22. :OK
  23. ECHO %1 : GIF OK >> %2
  24. GOTO END
  25. :STRIPM
  26. GIFSTRIP -B -N -M %1 > NUL:
  27. IF ERRORLEVEL 1 GOTO STRIPERR
  28. ECHO %1 : stripped OK >> %2
  29. GOTO END
  30. :STRIP
  31. GIFSTRIP -B -N %1 > NUL:
  32. IF ERRORLEVEL 1 GOTO STRIPERR
  33. ECHO %1 : stripped OK >> %2
  34. GOTO END
  35. :STRIPERR
  36. ECHO %1 : error while stripping >> %2
  37. GOTO END
  38. :NOTGIF
  39. ECHO %1 : not a GIF >> %2
  40. GOTO END
  41. :UNEOF
  42. ECHO %1 : GIF with unexpected EOF >> %2
  43. GOTO END
  44. :OOPS
  45. ECHO %1 : ERROR! >> %2
  46. :END
  47.